package com.tzy.user.config;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
/**
 * https://blog.csdn.net/qq_37651267/article/details/99305364
 */
public class FilterConfig {
//    @Bean
    public FilterRegistrationBean loginFilter() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
//        registration.setFilter(new LoginFilter());
        registration.addUrlPatterns("/api/*");
        registration.setName("LoginFilter");
        //数越小越先执行
        registration.setOrder(6);
        return registration;
    }

}
